import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description: 创建/删除文件
 */
public class FileTest3 {
    public static void main(String[] args) throws IOException {
        File file = new File("./test.txt");
        System.out.println(file.exists());
        System.out.println("创建文件");
        file.createNewFile();
        System.out.println("创建文件完成!");
        System.out.println(file.exists());
        System.out.println("删除文件");
        file.delete();
        System.out.println("删除文件完成!");
        System.out.println(file.exists());
    }
}
